package visao.Matricula;


import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;

import modelagem.Aluno;

import controle.Matricula.AcaoDaTela;




@SuppressWarnings("serial")
public class TelaMatricula extends JFrame{

	private AcaoDaTela acaoDaTela;
	private JPanel contentPane;
	private JTextField txtMatricula;
	private JTextField txtRg;
	private JTextField txtCpf;
	private JTextField txtCurso;
	private JTextField txtTelefone;
	private JTextField txtEmail;
	private JTextField txtDataNasc;
	private JTextField txtEndereco;
	private JButton btnSalvar;
	private JButton btnVisualizar;
	private JButton btnSair;
	private final ButtonGroup[] buttonGroup = new ButtonGroup[2];
	private JTextField txtNome;
	private final ButtonGroup buttonGroup_1 = new ButtonGroup();
	private JButton btnBuscar2;
	private JRadioButton rdbtnMasculino;
	private JRadioButton rdbtnFeminino;
	private Aluno aluno;
	
	
	public static void main(String[] args) {
		new TelaMatricula().setVisible(true);
	}
	
	/**
	 * Criando  frames.
	 */
	public TelaMatricula() {
		this.setBounds(300, 300, 600, 450);
		this.setLocationRelativeTo(null);
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		acaoDaTela = new AcaoDaTela(this);
		
		JLabel lblMatricula = new JLabel("MATRICULA");
		lblMatricula.setBounds(10, 11, 83, 14);
		contentPane.add(lblMatricula);
		
		txtMatricula = new JTextField();
		txtMatricula.setEditable(false);
		txtMatricula.setBounds(103, 8, 95, 20);
		contentPane.add(txtMatricula);
		txtMatricula.setColumns(10);
		
		JLabel lblRg = new JLabel("RG");
		lblRg.setBounds(10, 59, 46, 14);
		contentPane.add(lblRg);
		
		txtRg = new JTextField();
		txtRg.setEditable(false);
		txtRg.setBounds(103, 56, 162, 20);
		contentPane.add(txtRg);
		txtRg.setColumns(10);
		
		JLabel lblCpf = new JLabel("CPF");
		lblCpf.setBounds(291, 59, 46, 14);
		contentPane.add(lblCpf);
		
		txtCpf = new JTextField();
		txtCpf.setEditable(false);
		txtCpf.setBounds(347, 56, 209, 20);
		contentPane.add(txtCpf);
		txtCpf.setColumns(10);
		
		JLabel lblNome = new JLabel("NOME");
		lblNome.setBounds(10, 103, 46, 14);
		contentPane.add(lblNome);
		
		JLabel lblCurso = new JLabel("CURSO");
		lblCurso.setBounds(10, 151, 46, 14);
		contentPane.add(lblCurso);
		
		txtCurso = new JTextField();
		txtCurso.setEditable(false);
		txtCurso.setBounds(103, 148, 326, 20);
		contentPane.add(txtCurso);
		txtCurso.setColumns(10);
		
		btnBuscar2 = new JButton("....");
		btnBuscar2.setBounds(467, 147, 89, 23);
		contentPane.add(btnBuscar2);
		
		JLabel lblDataNascimento = new JLabel("TELEFONE");
		lblDataNascimento.setBounds(10, 204, 103, 14);
		contentPane.add(lblDataNascimento);
		
		txtTelefone = new JTextField();
		txtTelefone.setEditable(false);
		txtTelefone.setBounds(103, 201, 109, 20);
		contentPane.add(txtTelefone);
		txtTelefone.setColumns(10);
		
		JLabel lblEmail = new JLabel("EMAIL");
		lblEmail.setBounds(10, 251, 83, 14);
		contentPane.add(lblEmail);
		
		txtEmail = new JTextField();
		txtEmail.setEditable(false);
		txtEmail.setBounds(103, 248, 215, 20);
		contentPane.add(txtEmail);
		txtEmail.setColumns(10);
		
		JLabel lblDataNascimento_1 = new JLabel("DATA NASCIMENTO");
		lblDataNascimento_1.setBounds(347, 251, 116, 14);
		contentPane.add(lblDataNascimento_1);
		
		txtDataNasc = new JTextField();
		txtDataNasc.setEditable(false);
		txtDataNasc.setBounds(461, 248, 95, 20);
		contentPane.add(txtDataNasc);
		txtDataNasc.setColumns(10);
		
		JLabel lblEndereco = new JLabel("ENDERECO");
		lblEndereco.setBounds(10, 298, 103, 14);
		contentPane.add(lblEndereco);
		
		txtEndereco = new JTextField();
		txtEndereco.setEditable(false);
		txtEndereco.setBounds(103, 295, 453, 20);
		contentPane.add(txtEndereco);
		txtEndereco.setColumns(10);
		
		JPanel panel = new JPanel();
		panel.setBounds(10, 340, 564, 60);
		contentPane.add(panel);
		
		btnSalvar = new JButton("SALVAR");
		btnSalvar.addActionListener(acaoDaTela);
		panel.add(btnSalvar);
		
		btnVisualizar = new JButton("VISUALIZAR");
		btnVisualizar.addActionListener(acaoDaTela);
		panel.add(btnVisualizar);
		
		btnSair = new JButton("SAIR");
		btnSair.addActionListener(acaoDaTela);
		btnSair.setToolTipText("Sair");
		panel.add(btnSair);
		
		txtNome = new JTextField();
		txtNome.setEditable(false);
		txtNome.setBounds(103, 100, 453, 20);
		contentPane.add(txtNome);
		txtNome.setColumns(10);
		
		rdbtnMasculino = new JRadioButton("MASCULINO");
		buttonGroup_1.add(rdbtnMasculino);
		rdbtnMasculino.setBounds(260, 200, 109, 23);
		contentPane.add(rdbtnMasculino);
		
		rdbtnFeminino = new JRadioButton("FEMININO");
		buttonGroup_1.add(rdbtnFeminino);
		rdbtnFeminino.setBounds(447, 200, 109, 23);
		contentPane.add(rdbtnFeminino);
	}

	public JPanel getContentPane() {
		return contentPane;
	}
	public JTextField getTxtMatricula() {
		return txtMatricula;
	}

	public JTextField getTxtRg() {
		return txtRg;
	}

	public JTextField getTxtCpf() {
		return txtCpf;
	}

	public JTextField getTxtCurso() {
		return txtCurso;
	}

	public JTextField getTxtTelefone() {
		return txtTelefone;
	}

	public JTextField getTxtEmail() {
		return txtEmail;
	}


	public JTextField getTxtDataNasc() {
		return txtDataNasc;
	}

	public JTextField getTxtEndereco() {
		return txtEndereco;
	}

	public JButton getBtnSelecionar() {
		return btnSalvar;
	}


	public JButton getBtnVisualizar() {
		return btnVisualizar;
	}


	public JButton getBtnSair() {
		return btnSair;
	}

	public ButtonGroup[] getButtonGroup() {
		return buttonGroup;
	}

	public JTextField getTxtNome() {
		return txtNome;
	}
	public JButton getBtnBuscar2() {
		return btnBuscar2;
	}
	public JButton getBtnBuscar() {
		return getBtnBuscar();
	}
	public JRadioButton getRdbtnMasculino() {
		return rdbtnMasculino;
	}
	public JRadioButton getRdbtnFeminino() {
		return rdbtnFeminino;
	}

	public Aluno getAluno() {
		return aluno;
	}

	public void setAluno(Aluno aluno) {
		this.aluno = aluno;
	}
}
